export default {
  methods: {
    checkPermission(btnName) {
      // return this.$store.state.user.userInfo.roles.points.indexOf(btnName) !== -1
      // 判断个人数据存在的同时, 校验按钮权限
      // 避免退出时, 个人数据清空的一刹那报错
      const roles = this.$store.state.user.userInfo.roles
      return roles && roles.points.indexOf(btnName) !== -1
    }
  }
}
